<?php
class test {
	public $func;
	function index() {
		echo "index";
	}
	function __construct() {
		$this->func = new func ( );
	}
	function testControll() {
		$con = new Controll ( );
		print_r ( $con->getUrlPath () );
	}
	function testFunc_GetCurUrl() {
		print_r ( $this->func->GetCurUrl () );
	}
	function testFunc_Html2Text() {
		$html = "<html><body><div>test</div></body></html>";
		print_r ( $this->func->Html2Text ( $html ) );
	}
	function testFunc_Text2Html() { //无效
		$str = "test";
		print_r ( $this->func->Text2Html ( $str ) );
	}
	function testFunc_GetIP() {
		print_r ( $this->func->GetIP () );
	}
	function testFunc_Cookie() { //无效
		$key = "name";
		$value = "test";
		//print_r($this->func->PutCookie($key,$value));
		print_r ( $this->func->GetCookie ( $key ) );
		echo "<br>____________<br>";
		//$this->func->DropCookie($key);
		//print_r($this->func->GetCookie($key));
	}
	function testFunc_HtmlReplace() {
		$html = "<html><body><div>te st</div>  </body></html>";
		print_r ( $this->func->HtmlReplace ( $html, 2 ) );
	}
	function testFunc_ParamError() {
		print_r ( $this->func->ParamError ("404","error","baidu.com",300) );
	}
	function testFunc_ShowMsg() {
		$msg = "aaa";
		$gourl = "http://localhostpt.com";
		print_r ( $this->func->ShowMsg ( $msg, $gourl,"fdsaf",3000 ) );
	}
	function testFunc_WriteFile() {
		$url = "http://www.baidu.com/";
		$key = "123";
		$filename = "testFunc_Html2Text";
		$this->func->WriteFile ( $url, $filename, $key );
	}
	function testFunc_getFile() {
		$key = "123";
		$filename = "testFunc_Html2Text";
		$data = $this->func->getFile ( $filename, $key );
		print_r($data);
	}
	function testFunc_getDate(){
		echo "<script language=\"javascript\" type=\"text/javascript\" src=\"../help/date/WdatePicker.js\"></script>";
		echo "<input class=\"Wdate\" type=\"text\" onClick=\"WdatePicker()\">";
	}
}
?>